using DataDynamics.ActiveReports;
using DataDynamics.ActiveReports.Export.Xls;
using SS;
using SS.dir;
using System;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
using TVSBH.reports;
using TVSGPP.func;
namespace TVSGPP.bookGPP
{
	public class frmBillWithDoctor : Form
	{
		private Func objFunc = new Func();
		private DataTable objTable = new DataTable();
		private frmWaitting objW;
		private string doctorID = "";
		private string doctorName = "";
		private IContainer components = null;
		private DataGridView dgvInOut;
		private DataGridView dgvDoctor;
		private Button btnExportToExcel;
		private Button btnPrint;
		private Button btnClose;
		private GroupBox groupBox2;
		private System.Windows.Forms.TextBox txtSearch;
		private System.Windows.Forms.Label label2;
		private DateTimePicker txtfromDay;
		private DateTimePicker txttoDay;
		private GroupBox groupBox1;
		private System.Windows.Forms.Label label1;
		private DataGridViewTextBoxColumn ID;
		private DataGridViewTextBoxColumn DoctorName;
		private DataGridViewTextBoxColumn CreateDate;
		private DataGridViewTextBoxColumn billID;
		private DataGridViewTextBoxColumn productName;
		private DataGridViewTextBoxColumn productNumber;
		private DataGridViewTextBoxColumn productPrice2;
		private DataGridViewTextBoxColumn ProductMoneyNotVAT;
		private DataGridViewTextBoxColumn VATasMoney;
		private DataGridViewTextBoxColumn ProductMoney;
		private System.Windows.Forms.Label lblMsg;
		private System.Windows.Forms.Label label3;
		public frmBillWithDoctor()
		{
			this.InitializeComponent();
		}
		public void getDoctor()
		{
			try
			{
				SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
				sqlConnection.Open();
				SqlCommand sqlCommand = sqlConnection.CreateCommand();
				sqlCommand.CommandText = "SELECT ID, Name FROM [TabDoctor] ORDER BY NAME";
				SqlDataAdapter sqlDataAdapter = new SqlDataAdapter();
				sqlDataAdapter.SelectCommand = sqlCommand;
				DataSet dataSet = new DataSet();
				sqlDataAdapter.Fill(dataSet);
				this.dgvDoctor.DataSource = dataSet.Tables[0];
				sqlConnection.Close();
				sqlConnection.Dispose();
			}
			catch
			{
			}
		}
		private void frmBillWithDoctor_Load(object sender, EventArgs e)
		{
			this.getDoctor();
		}
		private void showWatting()
		{
			try
			{
				this.objW = new frmWaitting();
				this.objW.ShowDialog();
				Thread.Sleep(40);
			}
			catch
			{
			}
		}
		public void getDetailInfo(string _doctorID)
		{
			this.lblMsg.Visible = false;
			try
			{
				ThreadStart start = new ThreadStart(this.showWatting);
				Thread thread = new Thread(start);
				thread.Start();
				if (!thread.Join(150))
				{
					this.dgvInOut.DataSource = null;
					this.dgvInOut.AutoGenerateColumns = false;
					DataTable dataTable = new DataTable();
					DataColumn column = new DataColumn("CreateDate", typeof(DateTime));
					DataColumn column2 = new DataColumn("billID", typeof(string));
					DataColumn column3 = new DataColumn("productName", typeof(string));
					DataColumn column4 = new DataColumn("productNumber", typeof(float));
					DataColumn column5 = new DataColumn("productPrice2", typeof(float));
					DataColumn column6 = new DataColumn("ProductMoneyNotVAT", typeof(float));
					DataColumn column7 = new DataColumn("VATasMoney", typeof(float));
					DataColumn column8 = new DataColumn("ProductMoney", typeof(float));
					dataTable.Columns.Add(column);
					dataTable.Columns.Add(column2);
					dataTable.Columns.Add(column3);
					dataTable.Columns.Add(column4);
					dataTable.Columns.Add(column5);
					dataTable.Columns.Add(column6);
					dataTable.Columns.Add(column7);
					dataTable.Columns.Add(column8);
					SqlConnection sqlConnection = new SqlConnection(Program.strConnectionString);
					sqlConnection.Open();
					SqlParameter sqlParameter = new SqlParameter("objDate1", SqlDbType.DateTime);
					SqlParameter sqlParameter2 = new SqlParameter("objDate2", SqlDbType.DateTime);
					sqlParameter.Value = DateTime.Parse(this.txtfromDay.Value.ToString().Substring(0, 10) + " 00:00:00 AM");
					sqlParameter2.Value = DateTime.Parse(this.txttoDay.Value.ToString().Substring(0, 10) + " 11:59:59 PM");
					SqlCommand sqlCommand = sqlConnection.CreateCommand();
					sqlCommand.Parameters.Add(sqlParameter);
					sqlCommand.Parameters.Add(sqlParameter2);
					sqlCommand.CommandText = "SELECT CreateDate, billID, productName, ISNULL(productNumber,0) AS productNumber, ISNULL(productPrice2,0) AS productPrice2, ISNULL(ProductMoney,0) AS ProductMoney, ISNULL(VATasMoney,0) AS VATasMoney, ISNULL(ProductMoney,0) AS ProductMoney FROM TabDetailBill WHERE billID IN (SELECT ID FROM TabBill WHERE [_DoctorID] = '" + _doctorID + "' AND (TabBill.CreateDate BETWEEN @objDate1 AND @objDate2)) ORDER BY ProductName";
					SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
					while (sqlDataReader.Read())
					{
						dataTable.Rows.Add(new object[]
						{
							sqlDataReader["CreateDate"].ToString(),
							sqlDataReader["billID"].ToString(),
							" " + sqlDataReader["productName"].ToString().ToUpper(),
							sqlDataReader["productNumber"].ToString(),
							sqlDataReader["productPrice2"].ToString(),
							double.Parse(sqlDataReader["ProductMoney"].ToString()) - double.Parse(sqlDataReader["VATasMoney"].ToString()),
							sqlDataReader["VATasMoney"].ToString(),
							sqlDataReader["ProductMoney"].ToString()
						});
					}
					sqlDataReader.Close();
					sqlConnection.Close();
					sqlConnection.Dispose();
					this.btnPrint.Enabled = true;
					this.objTable = dataTable;
					this.dgvInOut.DataSource = this.objTable;
					if (this.objTable.Rows.Count > 0)
					{
						this.btnPrint.Enabled = true;
						this.btnExportToExcel.Enabled = true;
					}
					else
					{
						this.btnPrint.Enabled = false;
						this.btnExportToExcel.Enabled = false;
					}
				}
				thread.Abort();
				if (this.dgvInOut.Rows.Count == 0)
				{
					this.lblMsg.Visible = true;
				}
			}
			catch (Exception ex)
			{
				MessageBox.Show(ex.Message);
				this.btnPrint.Enabled = false;
				this.objTable = null;
				this.dgvInOut.DataSource = this.objTable;
			}
		}
		private void dgvDoctor_CellEnter(object sender, DataGridViewCellEventArgs e)
		{
			try
			{
				this.doctorID = this.dgvDoctor.Rows[e.RowIndex].Cells["ID"].Value.ToString();
				this.doctorName = this.dgvDoctor.Rows[e.RowIndex].Cells["DoctorName"].Value.ToString();
				this.getDetailInfo(this.doctorID);
			}
			catch
			{
				this.doctorID = "";
			}
		}
		private void btnPrint_Click(object sender, EventArgs e)
		{
			frmBookSellNotBillView frmBookSellNotBillView = new frmBookSellNotBillView();
			frmBookSellNotBillView.objectName = "BillWithDoctor";
			frmBillWithDoctorPrint.objTable = this.objTable;
			frmBillWithDoctorPrint.timePrint = "Từ ngày : " + this.txtfromDay.Value.ToShortTimeString() + " đến ngày : " + this.txttoDay.Value.ToShortTimeString();
			frmBillWithDoctorPrint.doctorName = this.doctorName;
			frmBookSellNotBillView.ShowDialog();
		}
		private void btnExportToExcel_Click(object sender, EventArgs e)
		{
			try
			{
				frmBillWithDoctorPrint.objTable = new DataTable();
				frmBillWithDoctorPrint.objTable = this.objTable;
				ActiveReport3 activeReport = new frmBillWithDoctorPrint();
				activeReport.Run();
				XlsExport xlsExport = new XlsExport();
				SaveFileDialog saveFileDialog = new SaveFileDialog();
				saveFileDialog.ShowDialog();
				string text = saveFileDialog.FileName;
				if (text != "")
				{
					if (!text.ToUpper().Contains(".XLS"))
					{
						text += ".xls";
					}
					xlsExport.Export(activeReport.Document, text);
					MessageBox.Show("Hệ thống đã hoàn thành việc xuất dữ liệu ra file Excel", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
				}
				else
				{
					MessageBox.Show("Bạn chưa chọn đường dẫn và tên file cần xuất!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
				}
			}
			catch
			{
			}
		}
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.components != null)
			{
				this.components.Dispose();
			}
			base.Dispose(disposing);
		}
		private void InitializeComponent()
		{
			DataGridViewCellStyle dataGridViewCellStyle = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle2 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle3 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle4 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle5 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle6 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle7 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle8 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle9 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle10 = new DataGridViewCellStyle();
			DataGridViewCellStyle dataGridViewCellStyle11 = new DataGridViewCellStyle();
			this.dgvInOut = new DataGridView();
			this.CreateDate = new DataGridViewTextBoxColumn();
			this.billID = new DataGridViewTextBoxColumn();
			this.productName = new DataGridViewTextBoxColumn();
			this.productNumber = new DataGridViewTextBoxColumn();
			this.productPrice2 = new DataGridViewTextBoxColumn();
			this.ProductMoneyNotVAT = new DataGridViewTextBoxColumn();
			this.VATasMoney = new DataGridViewTextBoxColumn();
			this.ProductMoney = new DataGridViewTextBoxColumn();
			this.dgvDoctor = new DataGridView();
			this.ID = new DataGridViewTextBoxColumn();
			this.DoctorName = new DataGridViewTextBoxColumn();
			this.btnExportToExcel = new Button();
			this.btnPrint = new Button();
			this.btnClose = new Button();
			this.groupBox2 = new GroupBox();
			this.txtSearch = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.txtfromDay = new DateTimePicker();
			this.txttoDay = new DateTimePicker();
			this.groupBox1 = new GroupBox();
			this.label1 = new System.Windows.Forms.Label();
			this.lblMsg = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			((ISupportInitialize)this.dgvInOut).BeginInit();
			((ISupportInitialize)this.dgvDoctor).BeginInit();
			this.groupBox2.SuspendLayout();
			this.groupBox1.SuspendLayout();
			base.SuspendLayout();
			this.dgvInOut.AllowUserToAddRows = false;
			this.dgvInOut.AllowUserToDeleteRows = false;
			this.dgvInOut.AllowUserToOrderColumns = true;
			this.dgvInOut.AllowUserToResizeColumns = false;
			this.dgvInOut.AllowUserToResizeRows = false;
			dataGridViewCellStyle.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvInOut.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle;
			this.dgvInOut.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right);
			this.dgvInOut.BackgroundColor = Color.White;
			this.dgvInOut.BorderStyle = BorderStyle.Fixed3D;
			this.dgvInOut.ColumnHeadersHeight = 26;
			this.dgvInOut.Columns.AddRange(new DataGridViewColumn[]
			{
				this.CreateDate,
				this.billID,
				this.productName,
				this.productNumber,
				this.productPrice2,
				this.ProductMoneyNotVAT,
				this.VATasMoney,
				this.ProductMoney
			});
			this.dgvInOut.Cursor = Cursors.Hand;
			this.dgvInOut.EnableHeadersVisualStyles = false;
			this.dgvInOut.Location = new Point(252, 8);
			this.dgvInOut.MultiSelect = false;
			this.dgvInOut.Name = "dgvInOut";
			this.dgvInOut.ReadOnly = true;
			this.dgvInOut.RowHeadersVisible = false;
			this.dgvInOut.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			dataGridViewCellStyle2.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvInOut.RowsDefaultCellStyle = dataGridViewCellStyle2;
			this.dgvInOut.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvInOut.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvInOut.Size = new Size(642, 550);
			this.dgvInOut.TabIndex = 42;
			this.CreateDate.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.CreateDate.DataPropertyName = "CreateDate";
			dataGridViewCellStyle3.Alignment = DataGridViewContentAlignment.MiddleLeft;
			dataGridViewCellStyle3.Format = "D";
			dataGridViewCellStyle3.NullValue = null;
			this.CreateDate.DefaultCellStyle = dataGridViewCellStyle3;
			this.CreateDate.HeaderText = "Ngày";
			this.CreateDate.MinimumWidth = 85;
			this.CreateDate.Name = "CreateDate";
			this.CreateDate.ReadOnly = true;
			this.CreateDate.Width = 85;
			this.billID.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.billID.DataPropertyName = "billID";
			this.billID.HeaderText = "Chứng từ";
			this.billID.MinimumWidth = 80;
			this.billID.Name = "billID";
			this.billID.ReadOnly = true;
			this.billID.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.billID.Width = 80;
			this.productName.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.productName.DataPropertyName = "productName";
			this.productName.HeaderText = "Diễn giải";
			this.productName.MinimumWidth = 100;
			this.productName.Name = "productName";
			this.productName.ReadOnly = true;
			this.productName.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.productNumber.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.productNumber.DataPropertyName = "productNumber";
			dataGridViewCellStyle4.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle4.Format = "N0";
			dataGridViewCellStyle4.NullValue = "0";
			this.productNumber.DefaultCellStyle = dataGridViewCellStyle4;
			this.productNumber.HeaderText = "Số lượng";
			this.productNumber.MinimumWidth = 90;
			this.productNumber.Name = "productNumber";
			this.productNumber.ReadOnly = true;
			this.productNumber.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.productNumber.Width = 90;
			this.productPrice2.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.productPrice2.DataPropertyName = "productPrice2";
			dataGridViewCellStyle5.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle5.Format = "N2";
			dataGridViewCellStyle5.NullValue = "0";
			this.productPrice2.DefaultCellStyle = dataGridViewCellStyle5;
			this.productPrice2.HeaderText = "Giá bán";
			this.productPrice2.MinimumWidth = 90;
			this.productPrice2.Name = "productPrice2";
			this.productPrice2.ReadOnly = true;
			this.productPrice2.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.productPrice2.Width = 90;
			this.ProductMoneyNotVAT.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.ProductMoneyNotVAT.DataPropertyName = "ProductMoneyNotVAT";
			dataGridViewCellStyle6.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle6.Format = "N2";
			dataGridViewCellStyle6.NullValue = "0";
			this.ProductMoneyNotVAT.DefaultCellStyle = dataGridViewCellStyle6;
			this.ProductMoneyNotVAT.HeaderText = "Doanh thu";
			this.ProductMoneyNotVAT.MinimumWidth = 90;
			this.ProductMoneyNotVAT.Name = "ProductMoneyNotVAT";
			this.ProductMoneyNotVAT.ReadOnly = true;
			this.ProductMoneyNotVAT.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.ProductMoneyNotVAT.Width = 90;
			this.VATasMoney.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.VATasMoney.DataPropertyName = "VATasMoney";
			dataGridViewCellStyle7.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle7.Format = "N2";
			dataGridViewCellStyle7.NullValue = "0";
			this.VATasMoney.DefaultCellStyle = dataGridViewCellStyle7;
			this.VATasMoney.HeaderText = "Thuế GTGT";
			this.VATasMoney.MinimumWidth = 90;
			this.VATasMoney.Name = "VATasMoney";
			this.VATasMoney.ReadOnly = true;
			this.VATasMoney.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.VATasMoney.Width = 90;
			this.ProductMoney.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.ProductMoney.DataPropertyName = "ProductMoney";
			dataGridViewCellStyle8.Alignment = DataGridViewContentAlignment.MiddleRight;
			dataGridViewCellStyle8.Format = "N2";
			dataGridViewCellStyle8.NullValue = "0";
			this.ProductMoney.DefaultCellStyle = dataGridViewCellStyle8;
			this.ProductMoney.HeaderText = "Tổng tiền";
			this.ProductMoney.MinimumWidth = 90;
			this.ProductMoney.Name = "ProductMoney";
			this.ProductMoney.ReadOnly = true;
			this.ProductMoney.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.ProductMoney.Width = 90;
			this.dgvDoctor.AllowUserToAddRows = false;
			this.dgvDoctor.AllowUserToDeleteRows = false;
			this.dgvDoctor.AllowUserToOrderColumns = true;
			this.dgvDoctor.AllowUserToResizeColumns = false;
			this.dgvDoctor.AllowUserToResizeRows = false;
			dataGridViewCellStyle9.BackColor = Color.FromArgb(192, 255, 255);
			dataGridViewCellStyle9.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvDoctor.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9;
			this.dgvDoctor.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left);
			this.dgvDoctor.BackgroundColor = Color.White;
			this.dgvDoctor.BorderStyle = BorderStyle.Fixed3D;
			this.dgvDoctor.ColumnHeadersHeight = 26;
			this.dgvDoctor.Columns.AddRange(new DataGridViewColumn[]
			{
				this.ID,
				this.DoctorName
			});
			this.dgvDoctor.Cursor = Cursors.Hand;
			this.dgvDoctor.EnableHeadersVisualStyles = false;
			this.dgvDoctor.Location = new Point(5, 75);
			this.dgvDoctor.MultiSelect = false;
			this.dgvDoctor.Name = "dgvDoctor";
			this.dgvDoctor.ReadOnly = true;
			this.dgvDoctor.RowHeadersVisible = false;
			this.dgvDoctor.RowHeadersWidthSizeMode = DataGridViewRowHeadersWidthSizeMode.DisableResizing;
			dataGridViewCellStyle10.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvDoctor.RowsDefaultCellStyle = dataGridViewCellStyle10;
			this.dgvDoctor.RowTemplate.DefaultCellStyle.Font = new Font("Arial", 9.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
			this.dgvDoctor.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
			this.dgvDoctor.Size = new Size(241, 454);
			this.dgvDoctor.TabIndex = 43;
			this.dgvDoctor.CellEnter += new DataGridViewCellEventHandler(this.dgvDoctor_CellEnter);
			this.ID.AutoSizeMode = DataGridViewAutoSizeColumnMode.None;
			this.ID.DataPropertyName = "ID";
			dataGridViewCellStyle11.Alignment = DataGridViewContentAlignment.MiddleLeft;
			dataGridViewCellStyle11.Format = "D";
			dataGridViewCellStyle11.NullValue = null;
			this.ID.DefaultCellStyle = dataGridViewCellStyle11;
			this.ID.HeaderText = "PID";
			this.ID.MinimumWidth = 85;
			this.ID.Name = "ID";
			this.ID.ReadOnly = true;
			this.ID.Visible = false;
			this.ID.Width = 85;
			this.DoctorName.AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
			this.DoctorName.DataPropertyName = "Name";
			this.DoctorName.HeaderText = "Tên bác sĩ";
			this.DoctorName.MinimumWidth = 100;
			this.DoctorName.Name = "DoctorName";
			this.DoctorName.ReadOnly = true;
			this.DoctorName.SortMode = DataGridViewColumnSortMode.NotSortable;
			this.btnExportToExcel.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnExportToExcel.Enabled = false;
			this.btnExportToExcel.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnExportToExcel.Location = new Point(357, 564);
			this.btnExportToExcel.Name = "btnExportToExcel";
			this.btnExportToExcel.Size = new Size(105, 30);
			this.btnExportToExcel.TabIndex = 48;
			this.btnExportToExcel.Text = "Xuất File Excel";
			this.btnExportToExcel.UseVisualStyleBackColor = true;
			this.btnExportToExcel.Click += new EventHandler(this.btnExportToExcel_Click);
			this.btnPrint.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.btnPrint.Enabled = false;
			this.btnPrint.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnPrint.Location = new Point(252, 564);
			this.btnPrint.Name = "btnPrint";
			this.btnPrint.Size = new Size(104, 30);
			this.btnPrint.TabIndex = 47;
			this.btnPrint.Text = "In báo cáo [ F7 ]";
			this.btnPrint.UseVisualStyleBackColor = true;
			this.btnPrint.Click += new EventHandler(this.btnPrint_Click);
			this.btnClose.Anchor = (AnchorStyles.Bottom | AnchorStyles.Right);
			this.btnClose.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.btnClose.Location = new Point(788, 564);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new Size(106, 30);
			this.btnClose.TabIndex = 49;
			this.btnClose.Text = "Thoát  [ ESC ]";
			this.btnClose.UseVisualStyleBackColor = true;
			this.groupBox2.Anchor = (AnchorStyles.Bottom | AnchorStyles.Left);
			this.groupBox2.Controls.Add(this.txtSearch);
			this.groupBox2.Controls.Add(this.label2);
			this.groupBox2.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox2.Location = new Point(5, 535);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new Size(241, 59);
			this.groupBox2.TabIndex = 50;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "Tìm kiếm theo bác sĩ";
			this.txtSearch.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.txtSearch.Font = new Font("Arial", 9f);
			this.txtSearch.Location = new Point(12, 24);
			this.txtSearch.Name = "txtSearch";
			this.txtSearch.Size = new Size(212, 21);
			this.txtSearch.TabIndex = 1;
			this.label2.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.label2.BackColor = SystemColors.ButtonHighlight;
			this.label2.Location = new Point(7, 17);
			this.label2.Name = "label2";
			this.label2.Size = new Size(224, 34);
			this.label2.TabIndex = 0;
			this.label2.TextAlign = ContentAlignment.MiddleLeft;
			this.txtfromDay.CustomFormat = "dd/MM/yyyy HH:mm:ss";
			this.txtfromDay.Font = new Font("Arial", 9f);
			this.txtfromDay.Format = DateTimePickerFormat.Custom;
			this.txtfromDay.Location = new Point(37, 27);
			this.txtfromDay.Name = "txtfromDay";
			this.txtfromDay.Size = new Size(86, 21);
			this.txtfromDay.TabIndex = 54;
			this.txttoDay.CustomFormat = "dd/MM/yyyy HH:mm:ss";
			this.txttoDay.Font = new Font("Arial", 9f);
			this.txttoDay.Format = DateTimePickerFormat.Custom;
			this.txttoDay.Location = new Point(144, 27);
			this.txttoDay.Name = "txttoDay";
			this.txttoDay.Size = new Size(86, 21);
			this.txttoDay.TabIndex = 56;
			this.groupBox1.Controls.Add(this.label3);
			this.groupBox1.Controls.Add(this.label1);
			this.groupBox1.Controls.Add(this.txtfromDay);
			this.groupBox1.Controls.Add(this.txttoDay);
			this.groupBox1.Font = new Font("Arial", 9f, FontStyle.Bold, GraphicsUnit.Point, 163);
			this.groupBox1.Location = new Point(5, 1);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(241, 68);
			this.groupBox1.TabIndex = 58;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Thời gian";
			this.label1.AutoSize = true;
			this.label1.Location = new Point(127, 29);
			this.label1.Name = "label1";
			this.label1.Size = new Size(11, 15);
			this.label1.TabIndex = 57;
			this.label1.Text = "-";
			this.lblMsg.Anchor = (AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
			this.lblMsg.BackColor = Color.White;
			this.lblMsg.ForeColor = Color.Red;
			this.lblMsg.Location = new Point(260, 75);
			this.lblMsg.Name = "lblMsg";
			this.lblMsg.Size = new Size(624, 24);
			this.lblMsg.TabIndex = 135;
			this.lblMsg.Text = "Không tin thấy thông tin liên quan !";
			this.lblMsg.TextAlign = ContentAlignment.MiddleCenter;
			this.lblMsg.Visible = false;
			this.label3.AutoSize = true;
			this.label3.Font = new Font("Arial", 9f);
			this.label3.Location = new Point(6, 29);
			this.label3.Name = "label3";
			this.label3.Size = new Size(28, 15);
			this.label3.TabIndex = 58;
			this.label3.Text = "Từ :";
			base.AutoScaleDimensions = new SizeF(7f, 15f);
			//base.AutoScaleMode = AutoScaleMode.Font;
			base.ClientSize = new Size(900, 600);
			base.Controls.Add(this.lblMsg);
			base.Controls.Add(this.groupBox1);
			base.Controls.Add(this.groupBox2);
			base.Controls.Add(this.btnClose);
			base.Controls.Add(this.btnExportToExcel);
			base.Controls.Add(this.btnPrint);
			base.Controls.Add(this.dgvDoctor);
			base.Controls.Add(this.dgvInOut);
			this.Font = new Font("Arial", 9f, FontStyle.Regular, GraphicsUnit.Point, 163);
			//base.Icon = (System.Drawing.Icon)componentResourceManager.GetObject("$this.Icon");
			base.Name = "frmBillWithDoctor";
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "BẢNG KÊ ĐƠN THUỐC CHI TIẾT";
			base.Load += new EventHandler(this.frmBillWithDoctor_Load);
			((ISupportInitialize)this.dgvInOut).EndInit();
			((ISupportInitialize)this.dgvDoctor).EndInit();
			this.groupBox2.ResumeLayout(false);
			this.groupBox2.PerformLayout();
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			base.ResumeLayout(false);
		}
	}
}
